-- card: 4784 from stack: in.0b2 -- bmap block id: 0 -- flags: 4000 -- background id: 3155 -- name: ----- HyperTalk script ----- ----------------------------------------------------------------------- -- openCard ----------------------------------------------------------------------- on openCard global h, v, disabled, fonts, fonts1, fonts2, fonts3, fonts4 put "(Geneva,New York,Monaco,Chicago" into fonts1 put "Geneva,(New York,Monaco,Chicago" into fonts2 put "Geneva,New York,(Monaco,Chicago" into fonts3 put "Geneva,New York,Monaco,(Chicago" into fonts4 put "Geneva,New York,Monaco,Chicago" into fonts put 4 into disabled set the textFont of card button "Example" to item disabled of fonts get the rect of card button "Example" put (last item of it) + top of card window into v put (first item of it) + left of card window + 1 into h pass openCard end openCard ----------------------------------------------------------------------- -- doPopUp ----------------------------------------------------------------------- on doPopUp global h, v, disabled, fonts, fonts1, fonts2, fonts3, fonts4 -- The following is to illustrate how popup menus can -- act like drop down menus. The trick is simply to -- position the top, left of the menu at the bottom, -- left of the button/menu title. get rect of the target put first item of it + first item of loc of card window + one into mouseH put fourth item of it + second item of loc of card window into mouseV do "get PopUpMenu( fonts" & disabled & ", empty, h, v )" if it is not empty then put it into disabled set the textFont of the target to item disabled of fonts end if end doPopUp -- part 1 (button) -- low flags: 00 -- high flags: A004 -- rect: left=197 top=153 right=175 bottom=297 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Example ----- HyperTalk script ----- on mouseDown doPopUp end mouseDown -- part contents for background part 10 ----- text ----- Disabled Items To disable an Items prefix the item’s text with an open parentheses. An item of the form “(-” produces a diabled line.